package com.gastronomy.service;

import java.util.List;
import java.util.Map;

import org.springframework.validation.BindingResult;
import org.springframework.web.multipart.MultipartFile;

import com.gastronomy.entity.DishesEntity;
import com.gastronomy.entity.User;

public interface DishesService {

	/**
	 * 查询用户下的所有菜肴
	 * 
	 * @param user
	 * @return
	 */
	public List<DishesEntity> listDishes(User user, String currentPage,
			Integer pageSize);

	/**
	 * 新增差品
	 * 
	 * @param dishesEntity
	 * @param picFile
	 * @return
	 */
	public Map<String, String> saveShesEntity(DishesEntity dishesEntity,
			MultipartFile picFile, User user);

	/**
	 * 根据id查询美食
	 * @param dishesId
	 * @return
	 */
	public DishesEntity queryDishesEntity(String dishesId);

	/**
	 * 下载美食
	 * @param dishIds 带下架的没事id
	 * @return
	 */
	public Map<String, String> underShelf(String dishIds);

	/**
	 * 查询所有菜肴
	 * 
	 * @param user
	 * @return
	 */
	public List<DishesEntity> listAllDishes(String currentPage);
	
	/**
	 * 根据访问量查询所有菜肴
	 * 
	 * @param user
	 * @return
	 */
	public List<DishesEntity> listDishesByVisitCount(String currentPage);
	
	/**
	 * 根据价格降序排列查询所有菜肴
	 * 
	 * @param user
	 * @return
	 */
	public List<DishesEntity> listDishesByPrice(String currentPage);
	
	/**
	 * 根据发布时间降序排列菜肴
	 * 
	 * @param user
	 * @return
	 */
	public List<DishesEntity> listDishesByCreateTime(String currentPage);
	
	/**
	 * 根据菜品名称模糊查询菜肴
	 * 
	 * @param user
	 * @return
	 */
	
	public void updateDishesFocus(DishesEntity dishesEntity);

	public List<DishesEntity> sortDishes(String type,String sortType, String foodName, String currentPage ,int pageSize);

	public String saveUploadPic(User user,MultipartFile picFile);

	public List<DishesEntity> listAllDishesByUserId(int userId);

}
